home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Meeting Pearls 4
/
Meeting Pearls Vol. IV (1996)(GTI - Schatztruhe)[!].iso
/
Pearls
/
dev
/
Oberon
/
OberonV4
/
system
/
AmigaConsole.Mod
(
.txt
)
< prev
next >
Wrap
Oberon Text
|
1996-05-28
|
3KB
|
82 lines
Syntax10.Scn.Fnt
Syntax10b.Scn.Fnt
MODULE AmigaConsole;
IMPORT SYSTEM, A := AmigaBase, e := AmigaExec, ie := AmigaInputEvent, u := AmigaUtility;
CONST
consoleName * = "console.device";
(****** SGR parameters ******)
primary * = 0;
bold * = 1;
italic * = 3;
underscore * = 4;
negative * = 7;
normal * = 22; (* default foreground color, not bold *)
notItalic * = 23;
notUnderscore * = 24;
positive * = 27;
(* these names refer to the ANSI standard, not the implementation *)
blank * = 30;
red * = 31;
green * = 32;
yellow * = 33;
blue * = 34;
magenta * = 35;
cyan * = 36;
white * = 37;
default * = 39;
blackBg * = 40;
redBg * = 41;
greenBg * = 42;
yellowBg * = 43;
blueBg * = 44;
magentaBg * = 45;
cyanBg * = 46;
whiteBg * = 47;
defaultBg * = 49;
(* these names refer to the implementation, they are the preferred *)
(* names for use with the Amiga console device. *)
clr0 * = 30;
clr1 * = 31;
clr2 * = 32;
clr3 * = 33;
clr4 * = 34;
clr5 * = 35;
clr6 * = 36;
clr7 * = 37;
clr0Bg * = 40;
clr1Bg * = 41;
clr2Bg * = 42;
clr3Bg * = 43;
clr4Bg * = 44;
clr5Bg * = 45;
clr6Bg * = 46;
clr7Bg * = 47;
(****** DSR parameters ******)
dsrCpr * = 6;
(****** CTC parameters ******)
ctcHSetTab * = 0;
ctcHClrTab * = 2;
ctcHClrTabsAll * = 5;
(****** TBC parameters ******)
tbcHClrTab * = 0;
tbcHClrTabsAll * = 3;
(****** SM and RM parameters ******)
mLNM * = 20; (* linefeed newline mode *)
mASM * = ">1"; (* auto scroll mode *)
mAWM * = "?7"; (* auto wrap mode *)
* You have to put a pointer to the console.device here to use the input
* procedures:
consoleBase*: e.DevicePtr;
PROCEDURE RawKeyConvert*(events: LONGINT; VAR buffer: ARRAY OF SYSTEM.BYTE;
length: LONGINT; keyMap: LONGINT):LONGINT;
r:A.Regs;
BEGIN
r.a[0]:=events;
r.a[1]:=SYSTEM.ADR(buffer);
r.d[1]:=length;
r.a[2]:=keyMap;
A.LibCall(consoleBase,-48,r);
RETURN r.d[0];
END RawKeyConvert;
END AmigaConsole.